#pragma once

#include "Approach.h"
#include "GridParam.h"
#include <boost/shared_ptr.hpp>
#include "CustomPoint.h"

class CApproachDrawer
{
public:
	typedef boost::shared_ptr<CApproachDrawer> Ptr;
	typedef list<Ptr> ListPtr;
public:
	CApproachDrawer(CApproach::Ptr pApproach, const CGridParam &gridParam);
	virtual ~CApproachDrawer(void);

	CPoint GetPos(int nWidth, int nHeight) const;
	void Draw(CDC *pCdc, int nWidth, int nHeight) const;
	double GetDistance(double dXpos, double dYpos) const;
	CApproach::Ptr GetApproach() const;
	
public:
	static COLORREF GetColorByDist(double dist);
	static COLORREF GetColorByDate(double date);
protected:
	CApproach::Ptr	m_pApproach;

	CPointDouble	m_dAppPos;
	CPointDouble	m_dHeadPos;

	COLORREF		m_rgbPoint;
	COLORREF		m_rgbLine;
};
